package edu.lingnan.springcloud;

import edu.lingnan.myrule.MyRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;

/**
 * @author wuyuan
 * @since 2020-06-08 10:48
 *
 * Ribbon 和 Eureka 整合后，客户端使用服务名来访问，不需要知道具体的ip地址或者域名
 */
@SpringBootApplication
@EnableEurekaClient
// 在微服务启动使时就能去加载我们自定义的Ribbon类
@RibbonClient(name = "SPRINGCLOUD-PROVIDER-CLASSES", configuration = MyRule.class)
public class ClassesConsumer80 {
    public static void main(String[] args) {
        SpringApplication.run(ClassesConsumer80.class, args);
    }
}
